  
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Create Account</title>         
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">Account List</g:link></span>
        </div>
        <div class="body">
            <h1>Create Account</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${account}">
            <div class="errors">
                <g:renderErrors bean="${account}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" method="post" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='name'>Account Name:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:account,field:'name','errors')}'>
                                    <input type="text" id='name' name='name' value="${fieldValue(bean:account,field:'name')}"/>
                                </td>
                            </tr>

                            <tr>
                                <td valign='top' class='name' colspan="2">
                                    <h3>Account user details</h3>
                                </td>
                            </tr>

                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='username'>Username:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:accountUser,field:'username','errors')}'>
                                    <input type="text" id='username' name='username' value="${fieldValue(bean:accountUser,field:'username')}"/>
                                </td>
                            </tr>

                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='userRealName'>Full Name:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:accountUser,field:'userRealName','errors')}'>
                                    <input type="text" id='userRealName' name='userRealName' value="${fieldValue(bean:accountUser,field:'userRealName')}"/>
                                </td>
                            </tr>

                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='passwd'>Password:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:accountUser,field:'passwd','errors')}'>
                                    <input type="password" id='passwd' name='passwd' value="${fieldValue(bean:accountUser,field:'passwd')}"/>
                                </td>
                            </tr>

                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='email'>Email:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:accountUser,field:'email','errors')}'>
                                    <input type="text" id='email' name='email' value="${fieldValue(bean:accountUser,field:'email')}"/>
                                </td>
                            </tr>

                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><input class="save" type="submit" value="Create"/></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
